<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<div class="col-main">
	<div class="product-view">
		<div class="product-essential row">
			<div class="span12" id="messages_product_view"></div>
			<form enctype="multipart/form-data" id="product_addtocart_form"
				method="post" action="<?php echo $this->addLink; ?>">
				<div class="product-img-box span4">
					<!-- <div class="products-new">New</div> -->
					<?php if ($this->product->discount) { ?>
					<div class="featured-product">Sale</div>
					<?php } ?>
					<p class="product-image">
						<img id="image"
							src="<?php echo JURI::base() . 'images/products/' . $this->product->code . '/normal.jpg'; ?>"
							alt="<?php echo $this->product->name; ?>"
							title="<?php echo $this->product->name; ?>" />
					</p>
					<div class="img-shadow">&nbsp;</div>
				</div>
				<div class="product-shop span6">
					<div class="product-name">
						<h1>
							<?php echo $this->product->name; ?>
						</h1>
					</div>
					<p
						class="availability <?php echo $this->product->quantity > 0 ? 'in-stock' : 'out-of-stock'; ?>">
						Trạng thái: <span><?php echo $this->product->quantity > 0 ? 'Còn hàng' : 'Hết hàng'; ?>
						</span>
					</p>
					<p class="sku">
						Mã:
						<?php echo $this->product->code; ?>
					</p>
					<div class="box1">
						<div class="price-box">
							<span class="regular-price"> <span class="price">
								<?php echo number_format($this->product->discount > 0 ? $this->product->discount : $this->product->price, 0, ',', '.'); ?> đ
							</span>
							</span>
							<?php if ($this->product->discount > 0) { ?>
							<span class="old-price"> <span class="price">
								<?php echo number_format($this->product->price, 0, ',', '.'); ?> đ
							</span>
							</span>
							<?php } ?>
						</div>
						<div class="product-options-bottom">
							<div class="add-to-cart">
								<label for="qty">Số lượng:</label>
								<input type="text" class="input-text qty" title="Qty" value="1" maxlength="12" id="qty" name="qty" />
								<button onclick="$('#product_addtocart_form').submit();"
									class="button btn-cart" title="Mua hàng" type="button">
									<span>Mua Hàng</span>
								</button>
							</div>
						</div>
					</div>
					<div class="short-description">
						<?php echo $this->product->description; ?>
					</div>
				</div>
				<div class="clearer"></div>
			</form>
		</div>
	</div>
</div>
